/**
 * 
 */
package com.jeecms.wicool.dao.orders.impl;

import com.jeecms.common.hibernate3.Finder;
import com.jeecms.common.hibernate3.HibernateBaseDao;
import com.jeecms.common.page.Pagination;
import com.jeecms.wicool.dao.orders.OrderAssessDao;
import com.jeecms.wicool.entity.orders.OrderAssess;

/**
 * @author spring
 *
 */
public class OrderAssessDaoImpl extends HibernateBaseDao<OrderAssess, Integer> implements
		OrderAssessDao {

	@Override
	protected Class<OrderAssess> getEntityClass() {
		return null;
	}

	@Override
	public Pagination getPage(Integer orderId, int pageNo, int pageSize) {
		Finder f = Finder.create("select bean from OrderAssess bean where 1=1 ");
		if(null!=orderId){
			f.append(" and bean.orders.id = :orderId");
			f.setParam("orderId",orderId);
		}
		f.append(" order by bean.id desc");
		return find(f, pageNo, pageSize);
	}

}
